#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

// set NOISY_TEST to 0 to remove printfs from output
#define NOISY_TEST 1


int main() {
    int seed = 1000;
    int numPlayer = 2;
    int r;
    int k[10] = {adventurer, council_room, feast, gardens, mine
               , remodel, smithy, village, baron, great_hall};
    struct gameState G;
	int loopCnt = 10; //how many loops I want to test this over and over
	int theResult, i;
	
#if (NOISY_TEST == 1)	
	printf ("TESTING numHandCards():\n");
#endif

	for(i=0; i<loopCnt; i++) {
	
        memset(&G, 23, sizeof(struct gameState));   // clear the game state
    
		r = initializeGame(numPlayer, k, seed, &G); // initialize a new game

		theResult = numHandCards(&G);
	
	#if (NOISY_TEST == 1)
					printf("whoseTurn = %d, expected = %d\n", theResult, 5);
	#endif
			
		assert(theResult == 5); // check if is correct
	}	
 
	printf("All tests passed!\n");

    return 0;
}
